package com.mz361.stdapi.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mz361.common.enums.StatusEnum;
import com.mz361.common.utils.StatusUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

/**
 * 标准计划数据实体类
 *
 * @author niceale
 * @date 2024/04/30
 */
@Data
@Entity
@Table(name = "std_standardNotice")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
public class StandardNotice {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonIgnore
    private Long id;
    //    计划号
    @ApiModelProperty(notes = "公告编号")
    private String standardNoticeNo;
    @ApiModelProperty(notes = "公告类型")
    private String standardType;
    @JsonIgnore
    private String noticeType;
    //    项目名称
    @ApiModelProperty(notes = "公告名称")
    private String title;
    //内容
    @ApiModelProperty(notes = "内容")
    @Column(columnDefinition = "BLOB")
    private String content;
    //起草单位
    @ApiModelProperty(notes = "发布单位")
    private String publishUnit;
    //发布时间
    @ApiModelProperty(notes = "发布时间")
    private String publishDate;

    // 数据状态
    @JsonIgnore
    private Byte status = StatusEnum.OK.getCode();
}
